<#macro list_elements directory menu>
		<#if directory.getRelativeDepth()!="">
			<li class="parent dir"><a href="../index.html">up</a></li>
		</#if>
		<#list menu?keys as key>
			<li class="current dir ${key}"><a href="${menu[key]}">${key}</a></li>
		</#list>
		<#list directory.getDirectories() as dir>
			<li class="children dir"><a href="${dir.getUrl(directory.getRelativePath(), "__directory__index.html.template")}">${dir.getName()}</a></li>
		</#list>
</#macro>

<#macro list directory menu>
		<ul class="dirs">
		<@list_elements directory=directory menu=menu/>
		</ul>
</#macro>